<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title><?=$da['frs']['filename']?></title>
    <!-- <link rel="shortcut icon" href="{{ $companyinfo->logo }}" /> -->
    <script src="/js/jquery.1.9.1.min.js"></script>
    <script type="text/javascript" src="<?=$da['frs']['edit_web']?>/web-apps/apps/api/documents/api.js"></script>
    <script src="/js/base64-min.js"></script>
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/js.js"></script>
</head>
<body style="padding:0px;margin:0px;">
<div id="placeholder" style="height:100%;width:100%"></div>
<script>
    var config = {
        "document": {
            "fileType": "<?=$da['frs']['fileext']?>",
            "key": "",
            "title": "<?=$da['frs']['filename']?>",
            "url": "<?=$da['frs']['web_url']?>/<?=$da['frs']['filepath']?>",
            "permissions": {
                "comment": false,
                "download": false,
                "fillForms": true,
                "print": true,
                'help': false
            }
        },
        "type": "desktop",
        "documentType": "<?=$da['frs']['doctype']?>",
        "editorConfig": {
            "mode": "edit",
            "lang": "zh-CN",
            "location": "zh-CN",
            "user": {
                "name": "<?=$da['frs']['optname']?>",
                "id": "<?=$da['frs']['optid']?>"
            },
            "help": false,
            "customization": {
                "chat": false,
                "autosave": false,
                "comments": false,
                "compactToolbar": false, //显示简单工具栏
                "help": false,
                'about': false,
                'feedback': false,
                "logo": {
                    "image": "<?=$da['frs']['web_url']?>/images/platlogo.png",
                    "imageEmbedded": "<?=$da['frs']['web_url']?>/images/platlogo.png",
                    "url": "<?=$da['frs']['web_url']?>"
                },
                "customer": {
                    "address": "",
                    "info": "",
                    "logo": "",
                    "mail": "",
                    "name": "",
                    "www": "<?=$da['frs']['web_url']?>"
                }
            },
            "callbackUrl": "<?=$da['frs']['web_url']?>/<?=$da['frs']['callback']?>"
        },
        "height": "100%",
        "width": "100%",
        "events": {
            "onDocumentReady": function () {
                //var obj = $('iframe')[0];
                //console.log(obj.src);
                //console.log('red');
                //docEditor.denyEditingRights('这个是个提示');
            }
        }
    };
    //console.log(config.editorConfig.callbackUrl);
    var docEditor = new DocsAPI.DocEditor("placeholder", config);
</script>
</body>
</html>